<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<PersonalAlbumModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
   <span class="errorMessage"><%=Html.Encode( Model.ErrorMessage)%></span>
    <div class="post_wrapper">
        <h1>
            <%= Html.Encode(Model.Post.Title) %>
        </h1>
        <div class="post_info">
             <span class="post_date1">
                <%=Model.Localize("Blog.postedOn")%>
            </span>
            <span class="post_date2">
                <%= Html.Encode(Model.Post.DateCreated.ToString("MMM d yyyy"))%>
            </span>
              <span class="post_author">
                <%if (!string.IsNullOrEmpty(Model.Post.UserName))
                  { %>
                |<%=Model.Localize("Blog.by")%>
                <%=Model.Post.UserName%>
                <%} %>
           </span>
           <%if (Model.Configuration.ShowReplies && (Model.Post.Replies.Count() > 0 || System.Diagnostics.Debugger.IsAttached))
             { %>
                 <span class="post_comments">
                   | <%=Model.Post.Replies.Count()%>&nbsp;<%=Model.Localize("Blog.Replies")%>
                </span>
           <%} %>
                
        </div>
       <div class="post_body">
            <%=Model.Post.Content %>
       </div>
        <%if (Model.Configuration.ShowSendToFriendBox)
                  { %>
                    <%Html.RenderPartial("SendToFriend");%>
                   <%} %>

<%=Html.Tooltip(MyAlbum.Services.Configuration.ConfigValues.ShowReplies)%>

                  
                     <%if (Model.Configuration.ShowReplies)
                       {%>
                    <div id="blog_replies">
               <%   Html.RenderPartial("ReplyItem");%>
                    </div>
             <% } %>
<%=Html.Tooltip(MyAlbum.Services.Configuration.ConfigValues.AutoApproveReplies)%>
&nbsp;             
<%=Html.Tooltip(MyAlbum.Services.Configuration.ConfigValues.ShowAddRepliesBox)%>
             
            <%if (Model.Configuration.ShowAddRepliesBox)
              {
                  Html.RenderPartial("AddReply");
                  %>
                   <%if (Model.Configuration.UseCaptcha){ %>
                     <script type="text/javascript">
                        <!--
                         function renderCaptcha() {
                             var url = '<%=Url.Action("Render", "Captcha") %>';
                             $.ajax({
                                 type: 'post',
                                 url: url,
                                 dataType: 'json',
                                 success: function(j) {
                                     var src = '<%=Url.Action("Index", "Captcha") %>?r=' + Math.random();
                                     var images = document.getElementsByName('captchaImages');
                                     for (var i = 0; i < images.length; i++) {
                                         images[i].src = src;
                                     }
                                 }, error: function(XMLHttpRequest, textStatus, errorThrown) {

                                     alert('<%=Model.Localize("Entry.Error") %>');
                                 }
                             })
                         }
                        -->
                     </script>
                     <%} %>
                  <%
              } %>
      </div>
    <p>
        <%=Html.ActionLink(Model.Localize("Blog.backToList"), "Index")%>
    </p>

</asp:Content>

